package cn03;

//方法被哪个对象调用，this就指向哪个对象

public class dog {
    private  String name;
    private  int age;

    public void setName(String name){
        this.name = name;
    }
    public void setAge(int age){
        this.age = age;
    }

    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }
}
